#include <iostream>
#include <cstring>

struct Student
{
    void InitStu(int ID,const char *Name)
    {
        id = ID;
        name =  strdup(Name);
    }
    int id;
    char *name;
    
};
//结构体名等于类型名
//可以在结构体内定义函数
//typedef Stu Student;
using Stu = Student;
int main()
{
    //Stu s = {1,"zhangsan"};
    Stu s;
    s.InitStu(1,"zhangsan");
    std::cout<<s.id<<" "<<s.name<<std::endl;
    return 0;
}